// lodash中的函数组合方法 _.flowRight

const _ = require('lodash');

// const reverse = arr => arr.reverse();
// const first = arr => arr[0];
// const toUpper = s => s.toUpperCase();

// const f = _.flowRight(toUpper, first, reverse);

// let arr = ['one', 'two', 'three'];
// console.log(f(arr));

// const f = _.flowRight(_.toUpper, _.first, _.reverse);
// const f = _.flowRight(_.flowRight(_.toUpper, _.first), _.reverse);
const f = _.flowRight(_.toUpper, _.flowRight(_.first, _.reverse));
let arr = ['one', 'two', 'three'];
console.log(f(arr));